package com.ssy.lingxi.settle.accounts.model.vo.request;

import com.ssy.lingxi.settle.accounts.handler.annotation.DateStringFormatAnnotation;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 结算订单信息VO，用于生成对账单数据
 * @author Saske
 * @date 2021/12/19
 * @version 2.0.0
 */
public class SettlementOrderVO implements Serializable {

    private static final long serialVersionUID = 633215077743949950L;

    /**
     * 订单id
     */
    @NotNull(message = "请选择需要生成对账单的数据")
    private Long billId;

    /**
     * 订单编号
     */
    @NotBlank(message = "请选择需要生成对账单的数据")
    private String billNo;

    /**
     * 发货批次
     */
    @NotBlank(message = "发货批次不能为空")
    private String deliveryBatch;

    /**
     * 发货单号
     */
//    @NotBlank(message = "发货单号不能为空")
    private String deliveryNo;

    /**
     * 收货单号
     */
//    @NotBlank(message = "收货单号不能为空")
    private String receiveNo;

    /**
     * 付款方
     */
    @NotBlank(message = "付款方不能为空")
    private String payer;

    /**
     * 买方（采购）会员Id
     */
    private Long buyerMemberId;

    /**
     * 买方（采购）会员角色Id
     */
    private Long buyerRoleId;

    /**
     * 订单状态
     */
    @NotBlank(message = "订单状态不能为空")
    private String orderStatus;

    /**
     * 单据订单类型
     */
    @NotNull(message = "单据订单类型不能为空")
    private Integer orderType;

    /**
     * 订单类型名称
     */
    private String orderTypeName;

    /**
     * 单据类型
     */
    private Integer billType;
    /**
     * 单据类型名称
     */
    private String billTypeName;

    /**
     * 单据日期 日期格式必须为yyyy-MM-dd
     */
    @DateStringFormatAnnotation(message = "请填写单据日期 日期格式必须为yyyy-MM-dd")
    private String billDate;

    /**
     * 单据金额
     */
    @NotNull(message = "单据金额不能为空")
    private BigDecimal billAmount;

    /**
     * 单据摘要
     */
    private String billAbstract;

    /**
     * 单据来源合同id
     */
    private Long sourceContractId;

    /**
     * 结算商品信息VO
     */
    @Valid
    @NotEmpty(message = "至少选择一条结算商品数据进行对账")
    private List<SettlementProductVO> products;

    public Long getBillId() {
        return billId;
    }

    public void setBillId(Long billId) {
        this.billId = billId;
    }

    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }

    public String getDeliveryBatch() {
        return deliveryBatch;
    }

    public void setDeliveryBatch(String deliveryBatch) {
        this.deliveryBatch = deliveryBatch;
    }

    public String getDeliveryNo() {
        return deliveryNo;
    }

    public void setDeliveryNo(String deliveryNo) {
        this.deliveryNo = deliveryNo;
    }

    public String getReceiveNo() {
        return receiveNo;
    }

    public void setReceiveNo(String receiveNo) {
        this.receiveNo = receiveNo;
    }

    public String getPayer() {
        return payer;
    }

    public void setPayer(String payer) {
        this.payer = payer;
    }

    public Long getBuyerMemberId() {
        return buyerMemberId;
    }

    public void setBuyerMemberId(Long buyerMemberId) {
        this.buyerMemberId = buyerMemberId;
    }

    public Long getBuyerRoleId() {
        return buyerRoleId;
    }

    public void setBuyerRoleId(Long buyerRoleId) {
        this.buyerRoleId = buyerRoleId;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public List<SettlementProductVO> getProducts() {
        return products;
    }

    public void setProducts(List<SettlementProductVO> products) {
        this.products = products;
    }

    public String getBillDate() {
        return billDate;
    }

    public void setBillDate(String billDate) {
        this.billDate = billDate;
    }

    public BigDecimal getBillAmount() {
        return billAmount;
    }

    public void setBillAmount(BigDecimal billAmount) {
        this.billAmount = billAmount;
    }

    public String getBillAbstract() {
        return billAbstract;
    }

    public void setBillAbstract(String billAbstract) {
        this.billAbstract = billAbstract;
    }

    public Long getSourceContractId() {
        return sourceContractId;
    }

    public void setSourceContractId(Long sourceContractId) {
        this.sourceContractId = sourceContractId;
    }

    public Integer getBillType() {
        return billType;
    }

    public void setBillType(Integer billType) {
        this.billType = billType;
    }

    public String getBillTypeName() {
        return billTypeName;
    }

    public void setBillTypeName(String billTypeName) {
        this.billTypeName = billTypeName;
    }

    public String getOrderTypeName() {
        return orderTypeName;
    }

    public void setOrderTypeName(String orderTypeName) {
        this.orderTypeName = orderTypeName;
    }
}
